#!/usr/bin/python
# -*- coding: UTF-8 -*-

import calendar
import os

cal = calendar.month(2016, 1)
print "以下输出2016年1月份的日历:"
print cal;


# 可写函数说明
def printinfo(arg1, *vartuple):
    "打印任何传入的参数"
    print "输出: "
    print arg1
    for var in vartuple:
        print var
    return;


# 调用printinfo 函数
printinfo(10);
printinfo(70, 60, 50);

sum = lambda arg1,arg2:arg1+arg2

print sum(1,3)

# bb = 2

def a(b):
    global bb
    bb = 3
    def c(d):
        return b*3*d
    return c

print a(1)(2),1,bb

cc = 1

def t(a):
    cc = a
    print(cc)


t(5)

print dir(calendar)

print calendar.__file__
print calendar.__name__
print calendar.__package__
print calendar.__file__
print calendar.__all__

print globals()

print os.getenv('PYTHONPATH')

print vars(os)

var = [x*5 for x in range(2,10,2)]
print var
print [x for x in range(2,10,2)]
print type(var)

var = input("请输入：")
print 'you write ' + str(var)
